package com.zsh.controller;

import com.zsh.Mapper.MenuMapper;
import com.zsh.domain.UamUserMenu;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(value = "用户菜单", tags = "用户菜单", description = "用户菜单", produces = "application/json;charset=utf-8")
public class MenuController {
    @Autowired
    private MenuMapper menuMapper;
    @RequestMapping(value = "/queryMenu",method = {RequestMethod.POST,RequestMethod.GET})
    @ApiOperation(value="queryMenu", notes="swaggerUI测试")
    public List<UamUserMenu> queryMenu(@RequestBody UamUserMenu param){
        List<UamUserMenu> uamUserMenuList = menuMapper.queryMenu(param.getUserId());
        return uamUserMenuList;
    }
}